package com.hashcoding.eyes.data.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * User
 *
 * @author Maochuan
 * @date 2016-02-03
 */
public class User implements Parcelable {
    public String userID;
    public String name;
    public String avatarURL;
    public String description;
    public String backgroundURL;

    public User(String u, String n, String a, String d, String b) {
        userID = u; name = n; avatarURL = a; description = d; backgroundURL = b;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(userID);
        dest.writeString(name);
        dest.writeString(avatarURL);
        dest.writeString(description);
        dest.writeString(backgroundURL);
    }

    protected User(Parcel in) {
        this.userID = in.readString();
        this.name = in.readString();
        this.avatarURL = in.readString();
        this.description = in.readString();
        this.backgroundURL = in.readString();
    }

    public static final Creator<User> CREATOR = new Creator<User>() {
        public User createFromParcel(Parcel source) {return new User(source);}

        public User[] newArray(int size) {return new User[size];}
    };
}
